package com.sg.controller.bff;

import com.sg.service.biz.bff.NullService;
import com.sg.dto.biz.bff.req.*;
import com.sg.dto.biz.bff.res.*;
import com.sg.common.ro.OkrResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ：
 * @version 1.0
 * @date ：
 */
@Api(value = "Null", tags = {"Null"})
@RestController
// @RequestMapping("/oms/null/")
public class NullController {

    @Autowired
    NullService nullService;

    /**
     * B1-3批量新增部门岗位职务关系（管理）
     */
    @PostMapping("/oms/mgt/deptPosition/batchAddDeptPosition")
    @ApiOperation(value = "B1-3批量新增部门岗位职务关系（管理）", response = OkrResult.class)
    public OkrResult<BffBatchAddDeptPositionRespDto> batchAddDeptPosition(@RequestBody(required = false) @Validated BffBatchAddDeptPositionReqDto reqDTO) {
        return OkrResult.success(nullService.batchAddDeptPosition(reqDTO));
    }

    /**
     * B1-3查询想存档部门岗位职务条件（管理）
     */
    @PostMapping("/oms/mgt/deptPosition/queryArchiveDeptPosition")
    @ApiOperation(value = "B1-3查询想存档部门岗位职务条件（管理）", response = OkrResult.class)
    public OkrResult<BffQueryArchiveDeptPositionRespDto> queryArchiveDeptPosition(@RequestBody(required = false) @Validated BffQueryArchiveDeptPositionReqDto reqDTO) {
        return OkrResult.success(nullService.queryArchiveDeptPosition(reqDTO));
    }


    /**
     * B1-2撤销存档自定义角色（管理）
     */
    @PostMapping("/oms/spaceRoleMember/undoArchiveCustomizeRoleMember")
    @ApiOperation(value = "B1-2撤销存档自定义角色（管理）", response = OkrResult.class)
    public OkrResult<BffUndoArchiveCustomizeRoleMemberRespDto> undoArchiveCustomizeRoleMember(@RequestBody(required = false) @Validated BffUndoArchiveCustomizeRoleMemberReqDto reqDTO) {
        return OkrResult.success(nullService.undoArchiveCustomizeRoleMember(reqDTO));
    }

    /**
     * B1-2发布自定义角色（管理）
     */
    @PostMapping("/oms/spaceRoleMember/releaseCustomizeRoleMember")
    @ApiOperation(value = "B1-2发布自定义角色（管理）", response = OkrResult.class)
    public OkrResult<BffReleaseCustomizeRoleMemberRespDto> releaseCustomizeRoleMember(@RequestBody(required = false) @Validated BffReleaseCustomizeRoleMemberReqDto reqDTO) {
        return OkrResult.success(nullService.releaseCustomizeRoleMember(reqDTO));
    }

    /**
     * B1-2删除自定义角色（管理）
     */
    @PostMapping("/oms/spaceRoleMember/deleteCustomizeRoleMember")
    @ApiOperation(value = "B1-2删除自定义角色（管理）", response = OkrResult.class)
    public OkrResult<BffDeleteCustomizeRoleMemberRespDto> deleteCustomizeRoleMember(@RequestBody(required = false) @Validated BffDeleteCustomizeRoleMemberReqDto reqDTO) {
        return OkrResult.success(nullService.deleteCustomizeRoleMember(reqDTO));
    }
}
